public class Test {
    public boolean judge (String str) {
        // write code here
        int left = 0,right = str.length()-1;
        char[] arr = str.toCharArray();
        while(left <= right){
            if(arr[left] == arr[right]){
                left++;
                right--;
            }else{
                return false;
            }
        }
        return true;
    }
}
